Skip to content

fix: Add missed events when removing listeners#157

Closed
changwoolab wants to merge 2 commits intopusher:masterfrom
changwoolab:feature/remove-listener
Closed

fix: Add missed events when removing listeners#157
changwoolab wants to merge 2 commits intopusher:masterfrom
changwoolab:feature/remove-listener

Conversation

@changwoolab
Copy link

Description

removeAllListeners does not currently remove all listeners.
Added missed event types when removing listeners

CHANGELOG

fix: add missed events when removing listeners

@changwoolab
Copy link
Author

@fbenevides @benw-pusher
Hi, could you review this?

Keith-wright pushed a commit that referenced this pull request Mar 16, 2026
PusherChannel.trigger() now accepts an event without channelName,
defaulting to the channel's own name, aligning with the documented API.

removeAllListeners() now correctly removes all 7 event listeners;
ON_CONNECTION_STATE_CHANGE and ON_SUBSCRIPTION_ERROR were previously
not cleared on init() and reset() calls, causing stale listeners to
accumulate. Adds an initial Jest test suite covering both fixes.

Supersedes #23, #157. Closes #167, #182.
@Keith-wright
Copy link
Contributor

Closing as the fix proposed here has been incorporated into #188, which was merged with full test coverage. Thanks for the original contribution @changwoolab!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants